package com.one.service;

import com.one.util.RequestReturn;
import com.one.vo.ProductVo;

import java.util.Map;

/**
 * @ClassName: ProductService
 * @Auther: yph
 * @Date: 2022/1/14 11:36
 * @Description: 商品详情业务接口
 */
public interface ProductService {

    /**
     * @Author: yph
     * @Date: 2022/1/14 11:37
     * @return:
     * @Description: 查询商品详情
     *
     *  id : 商品id
     *  userId : 用户id
     *  sessionId ： sessionId
     */
    ProductVo queryProductDetailById(Integer userId, Integer id,String sessionId);

    /**
     * @Author: yph
     * @Date: 2022/1/18 15:22
     * @return:
     * @Description: 查询商品的名字
     */
    String queryProductNameById(Integer id);

    /**
     * @Author: yph
     * @Date: 2022/1/22 01:17
     * @return: 
     * @Description: 根据id查看商品基本信息
    */
    RequestReturn<Map<String, Object>> queryProductStock(Integer productId);

    /**
     * @Author: yph
     * @Date: 2022/1/22 01:33
     * @return: 
     * @Description: 添加库存
    */
    RequestReturn<Map<String, Object>> addProductStock(Integer productId, Integer addNum);
}
